package com.c6906.vdam.das.dao;

import com.c6906.vdam.das.model.entity.BladeUnit;
import com.c6906.vdam.das.model.entity.TerminalBusinessInfo;
import com.c6906.vdam.das.model.entity.VehiclesLast;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : TAOHUIQI @Date: 2024/6/15 20:29 @Description:
 */
@Mapper
public interface TerminalBusinessInfoDAO {

    /**
     * 查询车辆信息-去除四类车辆
     *
     * @return
     */
    List<TerminalBusinessInfo> getTerminalBusinessInfoList(@Param("pageSize") int pageSize, @Param("pageNum") int pageNum);

    /**
     * 根据设备编号查询单个设备基本信息
     *
     * @return
     */
    List<TerminalBusinessInfo> getTerminalBusinessBySN(@Param("sn") String sn);

    /**
     * 根据设备编号查询单个设备基本信息
     *
     * @return
     */
    List<TerminalBusinessInfo> getTerminalBusinessBySNList(@Param("snList") List<String> sn);

    /**
     * 查询达梦数据库终端最新轨迹信息List
     *
     * @return
     */
    List<VehiclesLast> getVehiclesLastMapInfoList(@Param("pageSize") int pageSize, @Param("pageNum") int pageNum);

    boolean updateBatchByTerminalSn(List<VehiclesLast> list);

    BladeUnit getBladeUnitById(@Param("unitId") Long unitId);

    List<TerminalBusinessInfo> getNoTaskTerminalBusInfos(@Param("pageSize") int pageSize, @Param("pageNum") int pageNum, @Param("date") String date);

    List<TerminalBusinessInfo> getTwoDaysNoTaskTerminalBusInfos(@Param("pageSize") int pageSize, @Param("pageNum") int pageNum, @Param("date1") String date1, @Param("date2") String date2);

    TerminalBusinessInfo getTerminalBusinessByVehiclesCode(@Param("vehiclesCode") String vehiclesCode);
}
